FROM java:8

# FROM openjdk:8-jre-alpine

ENV TZ=Asia/Shanghai \
    SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
    JAVA_OPTS=""

ADD sources.list.debian /etc/apt/sources.list

RUN apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends netcat \
  && rm -rf /var/lib/apt/lists/*

ADD backstage-*.jar /backstage.jar
ADD http://dl.hc-yun.com/soft/wait /wait
ADD entrypoint.sh /usr/local/bin/entrypoint.sh
ADD application-dev.yml /application-dev.yml 

EXPOSE 8087

ENTRYPOINT ["entrypoint.sh"]

CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /backstage.jar